package icu.lookyousimileface.dao;


import icu.lookyousimileface.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.concurrent.CopyOnWriteArrayList;

/**
 * @author starrysky
 * @title: UserMapper
 * @projectName springboot_mybaits
 * @description: dao layer
 * @date 2021/2/818:41
 */
//代替了xml的<Mapper>扫描
@Mapper
@Repository
public interface UserMapper {
    /**
     * 查询所有用户
     * @return
     */
    CopyOnWriteArrayList<User> getUser();
    /**
     * 插入用户
     */
    int insertUser(@Param("id") Long id,
                   @Param("name") String name,
                   @Param("pwd") String pwd);
}
